package com.jk.service;

import com.jk.dao.InvestDao;
import com.jk.dao.UserDao;
import com.jk.entity.InvestmentTypeEntity;
import com.jk.pojo.UserBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 位佳生
 * @title: ManagementService
 * @projectName springboot_financial
 * @description: TODO
 * @date 2022/11/1110:09
 */
@Service
public class ManagementService {
    @Autowired
    private UserDao userDao;
    @Autowired
    private InvestDao investDao;
    /*
     *
     * @Author 位佳生
     * @Description //TODO 两表查询用户所有信息
     * @Date 2022/11/11 10:19

     * @return: java.util.List<com.jk.pojo.UserBean>
     **/
    public List<UserBean> getUserList(UserBean userBean) {
        return userDao.getUserList(userBean);
    }


    public List<InvestmentTypeEntity> getInvestmentTypeList() {
        try {
            List<InvestmentTypeEntity> list = investDao.getInvestmentTypeList();
            return list;
        }catch (Exception e){
            e.printStackTrace();
            return null;
        }
    }
}
